package com.cssl.serviceImpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzj.enums.OrderStatusEnum;
import com.cssl.mapper.OrderInfoSmsMapper;
import com.hzj.pojo.OrderInfo;
import com.hzj.pojo.vo.user.OrderCountQueryVo;
import com.hzj.service.OrderInfoService;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoSmsMapper, OrderInfo> implements OrderInfoService {

    @Autowired
    private OrderInfoSmsMapper oim;

    @Override
    public boolean updateOrderInfo(OrderInfo orderInfo) {
        return false;
    }

    @Override
    public int selectCount() {
        return 0;
    }

    @Override
    public Map<String, Object> getCountMap(OrderCountQueryVo orderCountQueryVo) {
        return null;
    }

    @Override
    public List<OrderInfo> patientTips() {
        QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
        wrapper.eq("reserve_date",new DateTime().toString("yyyy-MM-dd"));
        wrapper.ne("order_status", OrderStatusEnum.CANCLE.getStatus());
        List<OrderInfo> orderInfos = oim.selectList(wrapper);
        return orderInfos;
    }
}
